package com.lang.exception.datasource;

/**
 * creat by SimonLang
 * 2022/12/29 12:11
 */
public enum DataSourceExceptionEnum {

    /**
     * 1001-1020, 数据源通用异常
     */
    CONNECTION_EXCEPTION(1001,"数据源连接异常"),
    /**
     * 1021-1050  MySQL异常相关
     */
    MYSQL_CONNECTION_EXCEPTION(1021,"MySQL数据源连接异常"),

    /**
     * 1051-1080  Oracle异常相关
     */
    ORACLE_CONNECTION_EXCEPTION(1051,"Oracle数据源连接异常")
    ;

    private Integer code;

    private String message;

    DataSourceExceptionEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

